home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 5
/
Apprentice-Release5.iso
/
Source Code
/
C
/
Applications
/
MacGzip 1.0
/
source
/
Mac
/
GzPStrings.h
< prev
next >
Wrap
Text File
|
1995-08-14
|
853b
|
42 lines
/*
* SPDStrings.h
* (C) SPDsoft, August 13, 1995
*
* Some String utils
*/
#ifndef _SPD_STRINGS_
#define _SPD_STRINGS_
#ifdef _SPD_StrCpy_BM_
# define PStrCpy(dest,src) BlockMove((src), (dest), *(src) + 1 )
#else
/*
* From keith@taligent.com (Keith Rollin), Jim Reekes
*
* This way, C will create an inline loop that copies the
* string 4 bytes at a time in 64 iterations.
*
* (works with MPW C and Symantec C, at least
*/
typedef struct {
Str255 string;
} Str255Struct;
# define PStrCpy(a,b) *(Str255Struct*) (a) = *(Str255Struct*) (b)
#endif
void PStrCat( Str255 sio, Str255 si );
void CStrToStr255( Str255 pstr, char *s );
void Str255ToCStr( char *s, Str255 pstr );
OSType Str255ToOSType( Str255 pstr );
#define OSTypeToStr255( pstr, osty ) BlockMove( (osty), (pstr) + 1, sizeof(OSType)); *pstr = sizeof(OSType)
#endif